-
Notifications
You must be signed in to change notification settings - Fork 6
bl1 / v2.0 fixups #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
suspect due to the call function hook being thiscall, ecx was always a valid pointer, even if it pointed at garbage
been meaning to do this forever, kept forgetting
| MH_STATUS status = MH_OK; | ||
| status = MH_DisableHook(reinterpret_cast<LPVOID>(&GetStartupInfoA)); | ||
| if (status != MH_OK) { | ||
| LOG(ERROR, "Failed to disable GetStartupInfoA hook: {:x}", static_cast<uint32_t>(status)); | ||
|
|
||
| // If it fails, there isn't really any harm in leaving it active, just return | ||
| return; | ||
| } | ||
|
|
||
| status = MH_RemoveHook(reinterpret_cast<LPVOID>(&GetStartupInfoA)); | ||
| if (status != MH_OK) { | ||
| LOG(ERROR, "Failed to remove GetStartupInfoA hook: {:x}", static_cast<uint32_t>(status)); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for the duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disable vs remove? those aren't the same thing, best to clean up properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, i'm blind just assumed they were both remove lol
No description provided.